﻿using Inovout.Cloud.Applications.Models;
using Inovout.Memberships;
using Inovout.Models;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace Inovout.Cloud.Models
{
    public partial class Project : DataObject
    {
        public Project()
        {
            Applications = new DataObjectSet<IProjectApplication>();
        }
        [Required(ErrorMessage = "项目名称不可为空")]
        [Display(Name = "项目名称")]
        [Unique("Name",ErrorMessage = "项目名称已存在！")]
        public virtual string Name { get; set; }

        [Required(ErrorMessage = "项目标题不可为空")]
        [Display(Name = "项目标题")]
        public virtual string Title { get; set; }
        public virtual IMembership Membership { get; set; }
        public virtual ISet<Product> Products { get; set; }
        public virtual ISet<IProjectApplication> Applications { get; set; }
    }
}
